package homework39;

public class MenuItem {
    private String menuItemName;
    private Command Command;

    public MenuItem(String menuItemName) {
        super();
        this.menuItemName = menuItemName;
    }

    public String getMenuItemName() {
        return menuItemName;
    }

    public void setMenuItemName(String menuItemName) {
        this.menuItemName = menuItemName;
    }

    public Command getCommand() {
        return Command;
    }

    public void setCommand(Command command) {
        Command = command;
    }


    public void click(){
        Command.execute();
    }
}
